package main

import (
	"Ginproject/GinProject/Args_UrlRule/functional"
	"github.com/gin-gonic/gin"
)

func main() {
	router := gin.Default()

	router.LoadHTMLGlob("template/**/*")

	router.Static("/static", "static") // 推荐这个方式！！！

	router.GET("/param/:id", functional.GetUrlRule)
	router.GET("/param2/*id", functional.GetUrlRule2)
	router.GET("/query", functional.GetQueryData)
	router.GET("/query_arr", functional.GetQueryArrData)
	router.GET("/query_map", functional.GetQueryMapData)
	router.GET("/post_data", functional.PostData)
	router.POST("/add_data", functional.DoUserAdd)

	router.GET("/post_data2", functional.PostData2)
	router.POST("/add_data2", functional.DoUserAdd2)

	router.GET("/post_data3", functional.PostData3)
	router.POST("/add_data3", functional.DoUserAdd3)

	router.Run()

}
